package com.maimao.core.enums;

/**
 * @author MaoLin Wang
 * @date 2020/11/27 10:10 下午
 */
public enum RespCode {
    /**
     * 请求成功
     */
    OK(200, "ok"),
    FAIL(500, "请求失败"),

    LOGIN_FAIL(2001, "用户名或密码错误"),
    LOGIN_SUCCESS(2000, "登录成功"),

    NOT_VALID(400, "参数非法"),
    NOT_LOGIN(4001, "请先登录"),
    FORBIDDENED(403, "权限不足"),
    USER_NOT_EXIST(400, "用户不存在"),
    REPEAT_COMMIT(4002, "请勿重复请求"),

    ERR_TRANSITION(4005, "操作出错"),
    MERGE_SHOPPING_CART_ERROR(4006, "合并购物车出错"),
    MERGE_SHOPPING_CART_FAIL(4007, "合并购物车存在失败数据");


    private Integer code;
    private String msg;

    RespCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
